Users of computing devices sometimes use their computing devices to communicate with other users. As an example, a user may communicate with another user using a computing device by sending or receiving typed messages, such as by using the MICROSOFT MESSENGER (“MESSENGER”) instant messaging product. As another example, a user may communicate with another user by speaking into a microphone and hearing the other user on a speaker or headset, such as by using a Voice over Internet Protocol (“VoIP”) application. These users may use a variety of computing devices such as personal computers, personal digital assistants, cellular telephones, VoIP-enabled telephones, etc.
Applications providing these types of communications services to users may also need to provide presence information. Presence information conveys an ability or willingness of a user to communicate using a computing device. Presence information can be detected automatically by computing devices or actively selected by users. A computing device may automatically observe and communicate presence information, such as a user's “status.” As an example, when a user is not logged into any computing device or is not using (or logged into) an application that observes and conveys presence information, the user's status may be automatically indicated as “off-line.” When the user starts or logs into an application that observes and conveys presence information, such as MESSENGER, the user's status may be automatically indicated as “on-line.” When the user performs no actions on the computing device for a period of time, the application may automatically indicate that the user is “away.” Users can also actively select their status. As examples, users may indicate that they are “out for lunch” or “busy,” which could be indications that they may not immediately respond to messages from other users.
Multiple computing devices may register this presence information with a registration server computing device so that a “watcher,” which is an application desiring to determine a users status, can determine meaningful presence information by querying the registration server or subscribing to automatically receive presence information. As an example, MESSENGER may indicate to the registration server that the user has not performed any actions on the computing device for a period of time, and so the user's presence information could be “away.” A VoIP-enabled phone may indicate to the registration server that the user has placed a phone call, and so the user's presence information could be “on the phone.” When a watcher receives this presence information from the registration server, it may determine that the user's status is “on the phone and unable to respond to messages on the computing device.” If, however, the user begins to perform actions on the computing device, the watcher may determine that the user's status is “on the phone, but able to respond to messages on the computing device.” If the user actively indicates on the computing device that the user's status is “away” and uses a VoIP-enabled phone, then the watcher may determine that the user's status is “roaming.”
Communications applications sometimes need to establish and manage sessions between computing devices. A session is a set of interactions between computing devices that occurs over a period of time. As an example, real-time communications applications such as MESSENGER or VoIP establish sessions between communicating devices on behalf of users. These applications may use various mechanisms to establish sessions, such as a “Session Initiation Protocol” (“SIP”). SIP is an application-layer control protocol that computing devices can use to discover one another and to establish, modify, and terminate sessions between computing devices.
Applications may employ SIP with another protocol to send or receive information. By using SIP with other protocols, applications can create and manage a session and exchange information during the session. The protocol employed with SIP to exchange information may segment the information into messages. As an example, a VoIP application may segment a long narration into shorter messages. Exchanging messages during a session is referred to as a “dialog.” SIP may use lower-level communications layers to transport a dialog's messages, such as Transmission Control Protocol/Internet Protocol (“TCP/IP”), which are commonly employed transport- and network-layer protocols.
Transmission Control Protocol (“TCP”) is a connection-oriented, reliable delivery transport layer protocol. TCP is typically described as a transport layer that provides an interface between an application layer (e.g., an application using SIP) and a network layer. The application layer generally communicates with the TCP layer by sending or receiving a stream of data (e.g., a number of bytes of data). TCP organizes this datastream into segments that can be carried by the protocol employed at the network layer, e.g., the Internet Protocol (“IP”). These segments of data are commonly referred to as “packets,” “frames,” or “messages.” Each message generally comprises a header and payload. The header comprises data necessary for routing and interpreting the message. The payload comprises the actual data that is being sent or received. The application, transport, and network layers, together with other layers, are jointly referred to as a data communications stack.
Messages in a connection may transit intermediary computing devices. When a transport or network layer of a sending computing device's data communications stack establishes a connection with a corresponding layer of a data communications stack in a receiving computing device, messages exchanged by the computing devices may transit several intermediary computing devices. As examples, messages may transit proxy servers, network address translators, or gateways. These intermediary computing devices receive, process, and forward messages. As an example, a proxy server may be an intermediary between computing devices connected to an intranet and computing devices connected to the Internet. This proxy server may attempt to make the intranet more secure by, e.g., ignoring connection requests from outside the intranet.
Intermediary computing devices may terminate idle connections between two computing devices to use network resources efficiently. As an example, a MESSENGER or VoIP application executing on a user's computing device connected to an intranet (“computing device A”) may establish a SIP-based session with an application executing on another computing device connected to the Internet (“computing device B”). This session may use a TCP/IP connection between computing devices A and B, and messages exchanged by the computing devices may transit a proxy server. When no messages are exchanged in the connection for a period of time, the proxy server may close the connection between it and computing device B to conserve network resources. However, computing device A may be unaware that the connection is closed because its connection to the proxy server remains open. As a result, the application executing on computing device B may mistakenly assume that the application (or user) of computing device A is no longer online or using the connection. Moreover, to make the intranet to which the proxy server is connected more secure, the proxy server may ignore connection requests from devices not connected to the intranet, such as computing devices connected to the Internet. Consequently, the application executing on computing device B, which is connected to the Internet, may be unable to query the application executing on computing device A for its status or request to reestablish a session.
Intermediary computing devices may close connections even when computing devices use a “keep-alive” mechanism. Some computing devices employ a keep-alive mechanism to keep a connection alive despite a lack of messages. This mechanism involves sending “keep-alive” messages to indicate that the sender has not closed the connection. However, efficient intermediary computing devices may recognize keep-alive messages and, while keeping alive connections between the sending computing devices and the intermediary computing device, may terminate the connection to the recipient indicated in the keep-alive message (e.g., to computing devices connected to the Internet).
A connection may be sustained by sending a valid message of an application layer. As an example, a SIP application employing TCP in a transport layer may periodically send a valid SIP message, such as a REGISTER message. A REGISTER message may be used to enable a SIP server to associate a Uniform Resource Identifier (“URI”) of the sender of the message with the computing device used by the sender. When the valid SIP message cannot be sent or received, the SIP application may detect that its TCP connection is unavailable. A problem with sending REGISTER, or indeed any valid SIP message containing valid data, is that doing so could be computationally intensive when multiple clients and servers need to do so to sustain connections. In the case of REGISTER messages, a server receiving such a message may need to parse the message to determine the URI and the identity of the sender's computing device, and may further need to store the data in a database that is possibly on another server.
Thus, an effective approach to sustaining session connections that does not rely on TCP keep-alives or extensive computational processing of messages would have significant utility.
SIP is an Internet proposed standard. Its specification, “RFC 3261,” is available at <http://www.ietf.org/rfc/rfc3261.txt>. A specification for extensions to SIP relating to event notifications, “RFC 3265,” is available at <http://www.ietf.org/rfc/rfc3265.txt>. A specification relating to presence information in instant messaging systems, “RFC 2778,” is available at <http://www.ietf.org/rfc/rfc2778.txt>. A draft of a proposed specification relating to presence information in SIP is available at <http://www.ietf.org/internet-drafts/draft-ietf-simple-presence-10.txt>. All four of these specifications are incorporated herein in their entirety by reference.